package com.jun.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jun.mapper.SysOrderUserMapper;
import com.jun.pojo.entity.SysOrderUser;
import com.jun.pojo.vo.SysOrderUserVo;
import com.jun.service.SysOrderUserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class SysOrderUserServiceImpl extends ServiceImpl<SysOrderUserMapper, SysOrderUser>
    implements SysOrderUserService {

  @Autowired
  private SysOrderUserMapper sysOrderUserMapper;

  /**
   * 根据订单id查询 SysOrderUser 集合
   * @param orderId 根据订单id查询
   */
  public SysOrderUserVo selectByOrderId(Integer orderId) {
    return sysOrderUserMapper.selectByOrderId(orderId);
  }

  @Override
  public List<SysOrderUserVo> selectByUserId(Integer userId) {
    return sysOrderUserMapper.selectByUserId(userId);
  }
}
